package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/6.
 */
@HttpInlet(Net.OWNDATA)
public class PostOwnData  extends WHAsyPost<PostOwnData.Info> {
    public  String  driverid;
    public PostOwnData(String  driverid,AsyCallBack<Info> asyCallBack) {
        super(asyCallBack);
        this.driverid=driverid;
    }

    @Override
    protected Info parser(JSONObject object) {
        Info   info=new Info();

        try {
            info.message=object.getString("message");
            if(info.message.equals("0")){

            }else{
                info.picurl=object.getString("picurl");
                info.username=object.getString("username");
                info.mobile=object.getString("mobile");
                info.models=object.getString("models");
                info.idnumber=object.getString("idnumber");
                info.banknumber=object.getString("banknumber");

            }
            return   info;
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;


    }

    public static class Info {
        public String message;
        public String picurl;
        public String username;
        public String mobile;
        public String models;
        public String idnumber;
        public String banknumber;
    }
}
